package com.company;

import com.company.config.MyConfig;
import org.junit.Test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigurationPackage;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import javax.annotation.Resource;

/**
 * @Auther Xue
 * @Date 2021/4/25
 * @Version 1.0
 * @Desc
 */
//@SpringBootApplication 这是一个springboot应用
@SpringBootConfiguration
@SpringBootApplication
@AutoConfigurationPackage
public class HelloSpringBoot {
    public static void main(String[] args) {
        //返回一个IOC容器
        ConfigurableApplicationContext run = SpringApplication.run(HelloSpringBoot.class, args);

        //获取容器中定义的注解
//        String[] names = run.getBeanDefinitionNames();
//        for (String name : names) {
//            System.out.println(name);
//        }
    }

}
